package com.moli.iov.alarm.enums;

import java.util.ArrayList;
import java.util.List;

public enum AlarmReportTypeEnum  {

    ALARM_COUNT(1),//报警数量
    ALARM_STATUS(2),//报警状态
    ADD_ALARM_COUNT(3),//每天新增报警数
    REMOVE_ALARM_COUNT(4),//每天接触报警数
    VEHICLE_TYPE(5);//报警车型统计

    public static List<Integer> getFlags(){
        List<Integer> list  = new ArrayList<>();
        for (AlarmReportTypeEnum value : AlarmReportTypeEnum.values()) {
            list.add(value.flag);
        }
        return list;
    }

    public static AlarmReportTypeEnum getEnum(int flag){
        for( AlarmReportTypeEnum e :AlarmReportTypeEnum.values()){
            if(e.flag==flag){
                return e;
            }
        }
        return null;
    }

    private int flag;
    AlarmReportTypeEnum(int flag){
        this.flag = flag;
    }

    public int getFlag(){
        return flag;
    }
}
